<template>
  <div class="comitem">
    <div id="img" @click="comoanyImg(item.id)">
      <img :src="baseURL + item.logo" alt="" />
    </div>
    <div class="right">
      <h2>
        {{ item.name
        }}<span class="feng"
          ><span>{{ item.score }}</span
          >分</span
        >
      </h2>
      <div>
        {{ item.region }} <span>{{ item.distance }}</span>
      </div>
      <div class="ri_qiye">
        <span>{{ item.type }}</span>
        <span>{{ item.step }}</span>
        <span>{{ item.scale }}</span>
      </div>
      <div class="bottom">
        在招职位:<span class="bull">{{ item.positions }}</span
        >/最后跟新时间:<span>{{ item.updated_at | formatTime }}</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      baseURL: process.env.VUE_APP_URL
    }
  },
  methods: {
    comoanyImg (id) {
      this.$router.push(`/companyDetail/${id}`)
    }
  },
  props: ['item']
}
</script>

<style lang="less">
.comitem {
  min-height: 100px;
  width: 100%;
  margin-top: 20px;
  display: flex;
  #img {
    padding-top: 5px;
    margin-right: 5px;
    width: 63px;
    img {
      width: 100%;
    }
  }
  .right {
    flex: 1;
    // height: 60px;
    // background-color: skyblue;
    div {
      font-size: 14px;
    }
    h2 {
      font-weight: 400;
      margin: 0;
      margin-bottom: 5px;
      font-size: 22px;
      .feng {
        float: right;
        font-size: 16px;
      }
    }
    .ri_qiye {
      margin-top: 10px;
      & > span {
        color: #b4b4bd;
        margin: 0 5px;
        padding: 0 5px;
        background-color: #f7f4f5;
      }
    }
  }
  .bottom {
    color: #b4b4bd;
    margin-top: 10px;
    .bull {
      color: #01b8d4;
    }
  }
}
</style>
